package com.ruoyi.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ruoyi.order.domain.OrderGoodsCombo;
import com.ruoyi.order.mapper.OrderGoodsComboMapper;
import com.ruoyi.order.service.IOrderGoodsComboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单卖品详情Service业务层处理
 *
 * @author HHAOYU
 * @date 2021-01-12
 */
@Service
public class OrderGoodsComboServiceImpl extends ServiceImpl<OrderGoodsComboMapper, OrderGoodsCombo> implements IOrderGoodsComboService {
    @Autowired
    private OrderGoodsComboMapper orderGoodsComboMapper;

    /**
     * 查询订单卖品详情
     *
     * @param id 订单卖品详情ID
     * @return 订单卖品详情
     */
    @Override
    public OrderGoodsCombo selectOrderGoodsComboById(Long id)
    {
        return orderGoodsComboMapper.selectOrderGoodsComboById(id);
    }

    /**
     * 查询订单卖品详情列表
     *
     * @param orderGoodsCombo 订单卖品详情
     * @return 订单卖品详情
     */
    @Override
    public List<OrderGoodsCombo> selectOrderGoodsComboList(OrderGoodsCombo orderGoodsCombo)
    {
        return orderGoodsComboMapper.selectOrderGoodsComboList(orderGoodsCombo);
    }

    /**
     * 新增订单卖品详情
     *
     * @param orderGoodsCombo 订单卖品详情
     * @return 结果
     */
    @Override
    public int insertOrderGoodsCombo(OrderGoodsCombo orderGoodsCombo)
    {
        return orderGoodsComboMapper.insertOrderGoodsCombo(orderGoodsCombo);
    }

    /**
     * 修改订单卖品详情
     *
     * @param orderGoodsCombo 订单卖品详情
     * @return 结果
     */
    @Override
    public int updateOrderGoodsCombo(OrderGoodsCombo orderGoodsCombo)
    {
        return orderGoodsComboMapper.updateOrderGoodsCombo(orderGoodsCombo);
    }

    /**
     * 批量删除订单卖品详情
     *
     * @param ids 需要删除的订单卖品详情ID
     * @return 结果
     */
    @Override
    public int deleteOrderGoodsComboByIds(Long[] ids)
    {
        return orderGoodsComboMapper.deleteOrderGoodsComboByIds(ids);
    }

    /**
     * 删除订单卖品详情信息
     *
     * @param id 订单卖品详情ID
     * @return 结果
     */
    @Override
    public int deleteOrderGoodsComboById(Long id)
    {
        return orderGoodsComboMapper.deleteOrderGoodsComboById(id);
    }
}
